<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <!--优先使用 IE 最新版本和 Chrome-->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <!--360 使用Google Chrome Frame-->
    <meta name="renderer" content="webkit">
    <!--百度禁止转码-->
    <!--<meta http-equiv="Cache-Control" content="no-siteapp" />-->
    <!--页面关键词 keywords-->
    <meta name="keywords" content="主页 设置">
    <!--关闭chrome浏览器下翻译插件-->
    <meta name="google" value="notranslate"/>
    <!--为移动设备添加 viewport-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- 浏览网站时的小图标 -->
    <link rel="shortcut icon" type="image/x-icon" href="img/setting.png" media="screen"/>
    <title>导航页设置</title>

    <link rel="stylesheet" href="./module/layui/css/layui.css"/>
    <script src="./module/layui/layui.js"></script>

    <script src="./js/util.js"></script>

    <style>
        .layui-tab-title li {
            padding: 0 10px;
        }

        .footer {
            width: 100%;
            text-align: center;
            position: fixed;
            bottom: 10px;
        }
    </style>
</head>
<body>
<div class="layui-tab layui-tab-brief" lay-filter="tab">
    <ul class="layui-tab-title">
        <li class="layui-this">新增导航</li>
        <li>修改导航</li>
        <li>全局配置</li>
        <li>登陆/注册</li>
    </ul>

    <div class="layui-tab-content">

        <div class="layui-tab-item layui-show layui-anim layui-anim-upbit">
            <!--新增-->
            <div class="layui-form" lay-filter="index-add">
                <div class="layui-form-item">
                    <label class="layui-form-label">网址名称</label>
                    <div class="layui-input-block">
                        <input type="text" spellcheck="false" name="menuname" lay-verify="required" lay-verType="tips" autofocus
                               placeholder="请输入网址名称"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">网址链接</label>
                    <div class="layui-input-block">
                        <input type="text" spellcheck="false" name="menuurl" lay-verify="required" lay-verType="tips"
                               placeholder="请输入网址链接"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">图标</label>
                    <div class="layui-input-inline">
                        <label for="menuimg-add">
                            <img id="menuimgurl-add"
                                 src=""
                                 style="width: 50px;height: 50px;"/>
                        </label>
                        <input hidden type="file" id="menuimg-add" name="menuimg"
                               accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"/>
                    </div>

                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">排序</label>
                    <div class="layui-input-inline">
                        <input type="text" spellcheck="false" name="sort" lay-verify="required|number" lay-verType="tips"
                               placeholder="请输入排序"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="submit-add">新增</button>
                        <!--<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
                    </div>
                </div>
                <blockquote class="layui-elem-quote">
                    1：图标建议使用 <a style="color: #009688;" href="https://www.iconfont.cn/"
                                target="_blank">IconFont</a>
                    网站下载（使用电脑操作更方便）<br>
                    2：图标大小不能超过64Kb哦<br>
                    3：服务器购买不易，欢迎 推广 和 <a style="color: #009688;" id="donate" href="javascript:void(0);">给我捐赠</a>
                    哦<br>
                    4：© 2019 <a id="readme" style="color: #009688;" href="javascript:void(0);">点下看看</a><br>
                </blockquote>
            </div>
        </div>

        <div class="layui-tab-item layui-anim layui-anim-upbit">
            <!--修改导航-->
            <div class="layui-form" lay-filter="index-edit">
                <div class="layui-form-item">
                    <label class="layui-form-label">修改项</label>
                    <div class="layui-input-block">
                        <select name="index" lay-filter="select-index">
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">网址名称</label>
                    <div class="layui-input-block">
                        <input type="text" spellcheck="false" name="menuname" lay-verify="required" lay-verType="tips" autofocus
                               placeholder="请输入网址名称"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">网址链接</label>
                    <div class="layui-input-block">
                        <input type="text" spellcheck="false" name="menuurl" lay-verify="required" lay-verType="tips"
                               placeholder="请输入网址链接"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">图标</label>
                    <div class="layui-input-inline">
                        <label for="menuimg-edit">
                            <img id="menuimgurl-edit"
                                 src=""
                                 style="width: 50px;height: 50px;"/>
                        </label>
                        <input hidden type="file" id="menuimg-edit" name="menuimg"
                               accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">排序</label>
                    <div class="layui-input-inline">
                        <input type="text" spellcheck="false" name="sort" lay-verify="required|number" lay-verType="tips"
                               placeholder="请输入排序"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <input hidden name="rowid" value=""/>
                        <button name="btn-edit" disabled class="layui-btn layui-btn-disabled" lay-submit
                                lay-filter="submit-edit">修改
                        </button>
                        <button name="btn-del" disabled class="layui-btn layui-btn-danger layui-btn-disabled"
                                id="del">
                            删除
                        </button>
                        <!--<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
                    </div>
                </div>
            </div>

        </div>

        <div class="layui-tab-item layui-anim layui-anim-upbit">
            <!--全局配置-->
            <div class="layui-form" lay-filter="config">
                <div class="layui-form-item">
                    <label class="layui-form-label">搜索引擎</label>
                    <div class="layui-input-inline">
                        <select name="searchengines" lay-filter="select-config">
                            <option value="https://www.baidu.com/s?wd=">百度</option>
                            <option value="https://www.google.com/search?q=">Google</option>
                            <option value="http://www.bing.com/search?q=">必应</option>
                            <option value="http://www.so.com/s?q=">360搜索</option>
                            <option value="http://www.sogou.com/sogou?query=">搜狗搜索</option>
                            <option value="https://quark.sm.cn/s?q=">夸克AI搜索</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">展示Logo</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="logoshow" lay-skin="switch" lay-text="开启|关闭"
                               lay-filter="logoshow-filter">
                    </div>
                    <div class="layui-input-block" id="logoimgurldiv">
                        <label for="logoimg">
                            <img id="logoimgurl"
                                 src=""
                                 style="width: 50px;height: 50px;"/>
                        </label>
                        <input hidden type="file" id="logoimg" name="logoimg"
                               accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">展示天气</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="weatherswitch" lay-skin="switch" lay-text="开启|关闭"
                               lay-filter="weatherswitch-filter">
                    </div>
                    <div class="layui-input-inline" id="weathercitydiv">
                        <input type="text" spellcheck="false" name="weathercity" placeholder="请填写所在城市" autocomplete="off"
                               class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">展示古诗词</label>
                    <div class="layui-input-inline">
                        <input type="checkbox" name="searchinputshow" lay-skin="switch" lay-text="开启|关闭">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">展示背景图</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="backgroundimgshow" lay-skin="switch" lay-text="开启|关闭"
                               lay-filter="backgroundimg-filter">
                    </div>
                    <div class="layui-input-block" id="backgroundimgurldiv">
                        <label for="backgroundimg">
                            <img id="backgroundimgurl"
                                 src=""
                                 style="width: 50px;height: 50px;"/>
                        </label>
                        <input hidden type="file" id="backgroundimg" name="backgroundimg"
                               accept="image/gif,image/jpeg,image/jpg,image/png,image/svg"/>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="submit-config">保存</button>
                        <!--<button type="reset" class="layui-btn layui-btn-primary">重置</button>-->
                    </div>
                </div>
                <blockquote class="layui-elem-quote">
                    1：填写城市参考 北京<br>
                    2：Logo和背景图可以使用动态图片，但是总大小不能超过20M<br>
                    3：新增Logo更换，需要重新保存下全局配置logo展示才会生效<br>
                    4：部分图片 <a style="color: #009688;" target="_blank" href="./imgshare.html">下载</a><br>
                </blockquote>
            </div>
        </div>

        <div class="layui-tab-item layui-anim layui-anim-upbit">
            <!--登陆-->
            <div class="layui-form" lay-filter="login">
                <div class="layui-form-item">
                    <label class="layui-form-label">用户名</label>
                    <div class="layui-input-inline">
                        <input type="text" spellcheck="false" name="username" autofocus lay-verify="required" lay-verType="tips"
                               placeholder="请输入登录名"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">密码</label>
                    <div class="layui-input-inline">
                        <input type="password" name="password" lay-verify="required" lay-verType="tips"
                               placeholder="请输入密码"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="submit-login">登陆</button>
                        <button id="logout" class="layui-btn layui-btn-primary">登出</button>
                    </div>
                </div>
                <blockquote class="layui-elem-quote">
                    1：账号不存在会自动注册<br>
                    2：部分信息是缓存在浏览器本地的哦，比如登陆信息等，建议允许缓存<br>
                    3：如遇部分问题，可以试着清除浏览器缓存或者重新登陆下看看哦<br>
                    4：如果你有任何问题或者建议，发送至 heartaotime@foxmail.com 或者酷安 @皮皮狗子<br>
                </blockquote>
            </div>
        </div>
    </div>
</div>
<!--<div class="footer">-->
<!--    <p>© 2019 <a id="readme" style="color: #009688;" href="javascript:void(0);">点下看看</a></p>-->
<!--</div>-->

<script src="./js/set.js"></script>
<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
<!--<script type="text/javascript">-->
<!--    document.write(returnCitySN["cip"] + ',' + returnCitySN["cname"])-->
<!--</script>-->
</body>
</html>